package com.example.mvcdemo.login

import com.example.mvcdemo.entity.UserBean
import java.util.*


class LoginApi {
    private var random = Random()
    fun doLogin(callback: LoginListener, userBean: UserBean) {
        var randomValue: Int = random.nextInt(2)
        when (randomValue) {
            1 -> {
                callback.onLoginSuccess()

            }
            0 -> {
                callback.onloginFail()
            }
        }
    }

}